Solthodox Notes Quantitative finance 1

Sept 26, 2024 | #technical#finance#quant-finance

Here are my notes after learning about quantitative finance for a short period.

1.Introduction to Quantitative Finance

Quantitative finance, often referred to as "quant finance," is the application of mathematical and statistical methods to financial markets. This chapter provides a brief overview of the key concepts, participants, and theories in this field.

1.1Key Concepts

  1. Focus Area: Quant finance is primarily used in stocks and bonds markets.
  2. Empirical Basis: Unlike traditional economic theory, quant finance relies on empirical observations of prices, exchange rates, and interest rates.
  3. Statistical Foundation: The normal (Gaussian) distribution plays a crucial role in many quant finance models.
  4. Random Walk: This concept evolved into Geometric Brownian Motion, which is widely used to model financial market movements.
  5. Data Importance: Global economic indicators, such as U.S. employment figures, are extremely important for global predictions.
  6. Risk-Free Rate: This is typically the short-term central bank rate, considered the minimum return an asset should provide to make it worthwhile to invest.

1.2 Key Participants

  • Banks
  • Hedge funds
  • Insurance companies
  • Property investors
  • Investment managers

1.3 Important Definitions

  • Quantitative Analyst (Quant): A professional who applies mathematical and statistical methods to financial problems.
  • Risk-Free Rate: The theoretical rate of return of an investment with zero risk, often assumed to be the short-term central bank rate.
  • Forex: Foreign exchange market, where currencies are traded.
  • Carry Trade: A strategy involving buying currencies with higher interest rates.
  • Volatility: A measure of the "jumpiness" or variability of an asset's price.
  • PCA (Principal Component Analysis): A statistical technique used to analyze assets.

1.4 Main Arguments and Theories

  1. Efficient Market Theory: This theory suggests that market prices reflect all known information and follow a random pattern. Consequently, it argues that paying someone to manage your portfolio isn't worthwhile.

  2. Market Inefficiencies: In reality, markets are likely not perfectly efficient.

  3. Irrational Movements: When irrational market movements occur, statistical models can break down.

  4. Alternatives to Cash: Gold and Bitcoin are presented as two alternatives to traditional cash investments.

1.5 Valuing Options

The Black-Scholes equation is a cornerstone in quantitative finance, described as "the equation that launched a thousand models." It's a partial differential equation used to determine the price of an option.

Option: A contract giving the holder the right, but not the obligation, to buy or sell a financial asset in the future at an agreed price. The price of an option depends on:

  • Risk-free interest rate
  • Volatility of the underlying asset
  • Time to expiry
  • Strike price

1.6 Risk Management

Hedging risk is a common practice in the quant world, often utilizing options and futures contracts to protect against potential losses.

1.7 Conclusion

Quantitative finance is a complex field that combines mathematical precision with the unpredictability of financial markets. While models and theories provide valuable insights, it's crucial to remember that real-world markets can behave in ways that challenge even the most sophisticated quantitative approaches.


2. Understanding Probability and Statistics in Quantitative Finance

Probability and statistics form the backbone of quantitative finance. This chapter delves into the key statistical concepts and their applications in financial modeling.

2.1 Key Statistical Concepts

  1. Average (Mean): The most frequently reported statistic, representing the central tendency of a dataset.
  2. Standard Deviation: A measure of the width of a distribution, indicating how spread out the data points are.
  3. Variance: The squared value of the standard deviation, often used in financial calculations.
  4. Kurtosis Coefficient: A measure of the "thickness" of the distribution's tails, indicating the likelihood of extreme events.
  5. Skew: A measure of the asymmetry of a distribution. Positive skew indicates a concentration on the right side, and negative skew on the left.

2.2 Distributions in Finance

  1. Binomial Distribution: A discrete probability distribution of the number of successes in a sequence of independent experiments.
  2. Gaussian (Normal) Distribution: A continuous probability distribution that follows the famous bell-shaped curve.
  3. Central Limit Theorem: States that the distribution of sample means approximates a normal distribution as the sample size becomes larger.

2.3 Limitations of the Gaussian Model

While the Gaussian distribution provides a good approximation of asset returns, it's crucial to remember that the real world is not perfectly Gaussian. Extreme events can occur more frequently than predicted by this model, leading to "fat tails" in the distribution.

2.4 Important Considerations

  1. The combination of random variables tends to lead to a normal distribution, regardless of the distribution of individual variables.
  2. In financial modeling, it's essential to account for the possibility of extreme events that may not be captured by standard statistical models.

2.5 Applications in Quantitative Finance

  1. Risk Assessment: Standard deviation and variance are used to quantify the risk of financial instruments.
  2. Portfolio Optimization: Statistical measures help in creating diversified portfolios to balance risk and return.
  3. Option Pricing: The Black-Scholes model, which assumes a normal distribution of returns, is fundamental in options pricing.

2.6 Advanced Techniques

  1. Monte Carlo Simulations: A statistical method used to estimate the probability of different outcomes in a process that cannot easily be predicted due to the intervention of random variables.
  2. Stress Testing: A technique used to determine the stability of a given system or entity. It involves testing beyond normal operational capacity, often to a breaking point, to observe the results.

2.7 Conclusion

Understanding probability and statistics is crucial for anyone working in quantitative finance. While these tools provide powerful insights, it's important to remember their limitations and always consider the possibility of events that fall outside standard models.


3. Taking a Look at Random Behaviors in Quantitative Finance

3.1 Introduction to Random Behaviors

In quantitative finance, understanding random behaviors is crucial for modeling financial markets and asset prices. This chapter explores the concepts of random walks, drift, and their applications in financial modeling.

3.2 Key Concepts

  1. Random Walk: A mathematical concept used to model unpredictable patterns.
  2. Drift: A bias or trend in a random process.
  3. Volatility: A measure of the variation of price of a financial instrument over time.
  4. Monte Carlo Simulations: A technique used to model probability of different outcomes in a process that cannot easily be predicted.

3.3 Important Definitions

  • Monte Carlo Simulations: A statistical method used to estimate the probability of certain outcomes by running multiple simulations of a model under different random conditions. This technique is particularly useful when dealing with complex systems where analytical solutions are difficult or impossible to obtain. A prime example is modeling Brownian motion in financial markets.

3.4 Main Arguments/Points

  1. The distribution of individual random variables is less important than their combined effect. The process of combining random variables together typically leads to a normal distribution, as per the Central Limit Theorem.
  2. In financial modeling, we often use small steps and short time intervals, with minimal drift, to keep probabilities close to 50%.

3.5 Technical Details: Random Walks and Expected Values

Let's consider a simple random walk model:

// X = event
// δ = step to the right
// -δ = step to the left
// Δ = time for each step
// p = probability of moving right
// q = 1-p = probability of moving left

Expected value: E(X) = Σ (X * p)
Variance: V(X) = (δ * p) + (-δ * q)

// Expected value at time t using the Central Limit Theorem:
E(X(t)) = (t / Δ) * V(X)

In quantitative finance, we introduce drift (μ) and volatility (σ):

μ = drift
σ = volatility (standard deviation)

E(X(t)) = μ * t
V(X(t)) = σ² * t

3.6 Modeling Stock Market Movements

We can model stock price movements using a random walk:

S(0) = initial price
S(t) = price at time t
X(t) = percentage change in price: takes a value between -δ and δ

// Price at time t
S(t) = S(0) * (1 + X1) * (1 + X2) * (1 + X3) ...

// This formula can be simplified as:
log(S(t) / S(0)) = Σ(log(1 + Xi))

// Assuming the absolute value of X is always between 0 and 1:
ln(S(t) / S0) = Σ(Xi) - 1/2(Σ(Xi²))

Where Σ(Xi²) = Nδ²

// Therefore, we can transform the first equation to:
log(S(t) / S(0)) = Σ(Xi) - 1/2(δ² * t)

3.7 Homogeneous Random Walks and the Law of Large Numbers

If we consider a random walk with a completely homogeneous distribution (e.g., 50% probability of moving left or right), the Law of Large Numbers suggests that we will end up close to the starting point. This is why we often introduce a "drift" or bias in financial models.

3.8 Monte Carlo Simulations in Finance

Monte Carlo simulations are essentially simulations using random walks. They're particularly useful in finance for:

  1. Option pricing
  2. Risk management
  3. Portfolio optimization
  4. Scenario analysis

These simulations allow us to model complex financial systems and estimate outcomes under various random conditions.

3.9 Limitations and Considerations

While random walk models and Monte Carlo simulations are powerful tools in quantitative finance, it's important to remember that they are simplifications of reality. Real financial markets can exhibit behaviors that deviate from these models, especially during periods of crisis or extreme events.

3.10 Conclusion

Understanding random behaviors is fundamental to quantitative finance. From simple random walks to complex Monte Carlo simulations, these concepts allow us to model and analyze financial markets and instruments. However, as with all models, they should be used with an understanding of their limitations and in conjunction with other analytical tools.


4. Sizing up Interest Rates, Shares, and Bonds

4.1 Introduction

This chapter provides an explanation of some basic financial assets and their characteristics in the context of quantitative finance.

4.2 The Three Main Assets

  1. Bank deposits
  2. Stocks
  3. Bonds

4.3 Important Definitions

  • Compound Interest: The interest calculated on the initial principal and the accumulated interest from previous periods.
  • LIBOR (London Interbank Offer Rate): A benchmark interest rate at which major global banks lend to one another. It's used as a reference to price various financial products, including mortgages.
  • OTC (Over the Counter): Refers to the process of trading financial instruments directly between two parties, without the supervision of a formal exchange.

4.4 Technical Details: Bonds

Bonds are a form of debt. Key characteristics include:

  • The original amount borrowed is called the PRINCIPAL.
  • They are described as securities because they are tradeable assets.
  • They are considered fixed-income securities.
  • The interest payments on bonds are called COUPONS.

Bonds are graded based on their quality, reflecting the creditworthiness of the issuer.

Bond Issuers:

  • National and local governments
  • Large companies

The bond issuance process typically involves initial auctions, followed by trading in the secondary market.

4.5 Bond Types

  1. Coupon-bearing bonds:

    • Have a FACE VALUE at issuance.
    • The issuer pays interest (coupons) typically twice annually.

    To calculate the market price of a coupon-bearing bond:

    // M = market price
    // P = principal (face value)
    // C = coupon payment
    // t = current time
    // T = redemption time
    // y = interest rate (unknown future rate)
    // ti = time of i-th coupon payment
    
    M = P * e^(-y(T-t)) + Σ(C * e^(-y(ti - t)))
    
  2. Zero-coupon bonds:

    • Pay all interest at maturity along with the principal.

4.6 Clean Prices

When pricing bonds, we discount the interest that has already been accrued. These adjusted prices are called "clean prices".

Accrued Interest = Coupon * (Days since last coupon / Days between coupons)

4.7 Interest Rate Swaps

Interest rate swaps are among the most common financial products. They are used to exchange interest payment obligations. Typically, a fixed interest rate is swapped for a variable one. These swaps are so important that their prices are often considered more reliable than other interest rate products.

Key points:

  • The floating (variable) rate is often the 6-month LIBOR.
  • The fixed rate in the swap is called the SWAP RATE.
  • Interest rate swaps are typically traded OTC (Over The Counter).

4.8 The Yield Curve

The yield curve is a graphical representation of the relationship between interest rates and the time to maturity for bonds of the same credit quality. It's a crucial tool in fixed-income investing and economic forecasting.

A typical yield curve plots the yield (interest rate) on the y-axis and the time to maturity on the x-axis. It often shows an upward slope, indicating higher yields for longer-term bonds, but can take other shapes (flat, inverted) depending on economic conditions and expectations.

4.9 Conclusion

Understanding the basics of interest rates, shares, and bonds is crucial in quantitative finance. These fundamental assets form the building blocks for more complex financial instruments and strategies. The pricing and behavior of these assets, especially bonds and interest rate products, often involve sophisticated mathematical models that are central to quantitative finance practices.


5. Exploring Options

5.1 Introduction to options

In this chapter, we will explore options—financial contracts that give the holder the right, but not the obligation, to buy or sell an asset at a predetermined price in the future. Options are essential in quantitative finance due to their flexibility in hedging, speculation, and generating income. We will delve into key concepts, definitions, strategies, and technical details surrounding options.

5.2 Key Concepts

  1. Call Option: Gives the holder the right to buy an asset at a predetermined price (strike price) before or at the expiration date.
  2. Put Option: Gives the holder the right to sell an asset at a predetermined price before or at the expiration date.
  3. Premium: The price paid by the buyer to acquire the option, which compensates the seller for taking on the potential risk.

5.3 Important Definitions

  • Naked Position: This refers to when the option writer (seller) holds no offsetting position, exposing them to significant risk if the market moves against them. For example, writing a naked call means potentially unlimited losses if the price of the asset rises.
  • OTC (Over-the-Counter): Options that are traded in private, unregulated markets, typically between two parties, rather than on a centralized exchange.
  • Covered Call: A strategy where the seller of a call option holds the underlying asset, reducing the potential risk.

5.4 Main Arguments/Points

  1. Options for Speculation: Traders use options to speculate on the direction of asset prices, allowing them to make high returns with limited initial investment.
  2. Hedging with Options: Investors use options to reduce risk by locking in prices or minimizing potential losses on other positions.
  3. Writing Options: Writing options can provide income through the premium, but the risk can be high, especially with naked options.

5.5 Technical Details

The payoff of an option is always greater than or equal to 0 because an option gives the right, but not the obligation, to execute a trade.

For call options, the payoff is:

// S = Stock price (price of the underlying asset)
// X = Strike price
call payoff = Max(S - X, 0)

For put options, the payoff is:

put payoff = Max(X - S, 0)

This means the payoff is positive when the underlying asset price moves in the buyer’s favor (higher for calls, lower for puts).

5.6 Diagrams/Illustrations

A helpful diagram would include the payoff charts for both call and put options, showing how the profit or loss changes based on the underlying asset's price at expiration.

For a Call Option:

  • Above the strike price, the payoff increases as the asset price rises.

For a Put Option:

  • Below the strike price, the payoff increases as the asset price falls.

5.7 Examples

  1. Bullish on an Asset: If you believe the asset's price will rise, you buy a call option with a lower strike price, allowing you to buy the asset at a cheaper rate if the price increases.
  2. Bearish on an Asset: If you believe the asset's price will fall, you buy a put option with a higher strike price, enabling you to sell the asset at a higher price than the market.
  3. Short Call Position: If you sell a call option, you are in a short call position, obligated to sell the asset if the buyer exercises their option.
  4. Short Put Position: If you sell a put option, you are in a short put position, obligated to buy the asset if the buyer exercises their option.

5.8 Types of Options

  • Vanilla Options:

    • Call: Gives the right to buy the asset.
    • Put: Gives the right to sell the asset.
  • Binary Options: The payoff is fixed. If, at expiration, the underlying asset price is above the strike price (for calls) or below (for puts), a fixed amount is paid, regardless of how far above or below the asset price is.

5.9 Reading Financial Data

Key terms to understand when reviewing option data:

  • Strike: The price at which the option can be exercised.
  • Open Interest: The total number of outstanding contracts for a particular strike price and expiry.
  • Ask: The price at which you can buy an option (always higher than the bid).
  • Bid: The price at which you can sell an option.
  • Daily Volume: The number of contracts traded on a given day.
Strike Call/Put Settlement Open Interest Last Bid Ask
45.00 Call 6.20 1,523 6.25 6.15 6.30
45.00 Put 0.75 987 0.80 0.70 0.85
50.00 Call 3.15 3,245 3.20 3.10 3.25
50.00 Put 2.40 2,156 2.45 2.35 2.50
55.00 Call 1.30 2,789 1.35 1.25 1.40
55.00 Put 5.35 1,678 5.40 5.30 5.45
60.00 Call 0.45 1,234 0.50 0.40 0.55
60.00 Put 9.50 876 9.55 9.45 9.60

Longer-duration options are more expensive because they have more time to reach a favorable payoff.

5.10 Hedging Risk with Options

Hedging is the practice of using options to reduce or cover the risk of another investment. For example, buying a put option while holding a stock position can protect you from a potential price decline.

5.11 Writing Options

The primary reason to write (sell) options is to receive the premium upfront, hoping the buyer will not exercise their option. However, writing options comes with significant risk, particularly if you're not hedged (naked position), as you may be forced to buy or sell the asset at unfavorable prices.

5.12 Conclusions

Options are versatile tools for speculation, hedging, and generating income. Understanding their structure, payoff mechanisms, and associated risks is critical for making informed investment decisions. When used correctly, options can enhance an investment strategy by offering greater flexibility and risk management.

Share this article